<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<style>
.menu {
	position: absolute;
	top: 0px;
	bottom: 0;
	width: 90%;
	background: #1b6d85;
}

.btn-full {
	width: 100%;
	border-radius: 0;
}

.current-sel {
	background-color: #cccccc;
	font-style: italic;
	font-weight: bolder;
}
</style>
<div class="menu">
	<div class="panel-group" id="accordion" role="tablist"
		aria-multiselectable="true">
		<a class="btn btn-primary btn-full" role="button"
			data-toggle="collapse" href="#collapseOne" aria-expanded="false"
			aria-controls="collapseOne"> 新闻管理 </a>
		<div id="collapseOne" class="panel-collapse collapse">
			<div class="list-group">
				<a href="#" class="list-group-item" id="lgi101">新闻撰稿</a> <a href="#"
					class="list-group-item" id="lgi102">新闻审核</a> <a href="#"
					class="list-group-item" id="lgi103">新闻列表</a> <a href="#"
					class="list-group-item" id="lgi104">新闻分类</a>
			</div>
		</div>

		<a class="btn btn-primary btn-full" role="button"
			data-toggle="collapse" href="#collapseTwo" aria-expanded="false"
			aria-controls="collapseTwo"> 系统管理 </a>
		<div id="collapseTwo" class="panel-collapse collapse">
			<div class="list-group">
				<a href="${ContextPath}admin/userlist?view=jsp" class="list-group-item"
					id="lgi201">用户管理(jsp片段)</a>
					<a href="${ContextPath}admin/userlist?view=jstl" class="list-group-item"
					id="lgi202">用户管理(jstl)</a>
					<a href="${ContextPath}admin/paginated_userlist"
					class="list-group-item" id="lgi203">用户管理（分页）</a>
			</div>
		</div>

		<a class="btn btn-primary btn-full" role="button"
			data-toggle="collapse" href="#collapseThree" aria-expanded="false"
			aria-controls="collapseThree">个人资料 </a>
		<div id="collapseThree" class="panel-collapse collapse">
			<div class="list-group">
				<a href="${ContextPath}admin/changepass.jsp" class="list-group-item"
					id="lgi301">密码修改</a>
			</div>
		</div>
	</div>
</div>
<script>
	$('.list-group-item').click(function() {
		localStorage.setItem('cursel', $(this).attr('id'));
	});

	$('#collapseOne').collapse("show");
	$('#collapseTwo').collapse("show");
	$('#collapseThree').collapse("show");
	var menuid = localStorage.getItem('cursel');
	if (menuid != '') {
		$('a#' + menuid).addClass("current-sel");
	}
</script>